React Js / Basics / New Project
Installation & New Project
-
1. Step
React js is a component-based javascript library used to build dynamic and interactive user interfaces.
It makes use of virtual DOM (JavaScript object), which enhances the efficiency or performance of the APP.
1. System Requirement
1. Install node.js and npm.
2. check the version
node -v npm -v 2. Create New project
option 1. Using Create React App (CRA)npx create-react-app my-app --template typescript Run the project
option 2. Using Vite (Faster alternative)cd my-app npm start npm create vite@latest my-app -- --template react-ts run
cd my-app npm install npm run dev browse http://localhost:3000/ in browser
3. Project Structure (CRA and Vite)
my-app/ ├── public/ ├── src/ │ ├── App.tsx │ ├── main.tsx (Vite) / index.tsx (CRA) │ └── ... ├── tsconfig.json ├── package.json └── ...
MANVIA BLOG